﻿namespace Example.Creational
{
    using Example.Creational.AbstractFactory;

    using Xunit;

    /// <summary>
    /// Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
    /// </summary>
    public sealed class AbstractFactoryFacts
    {
        [Fact]
        public void color_printer_cartridge()
        {
            IPrinter printer = new ColorPrinter();

            Assert.IsType<ColorCartridge>(printer.Cartridge);
        }

        [Fact]
        public void monochrome_printer_cartridge()
        {
            IPrinter printer = new MonochromePrinter();

            Assert.IsType<MonochromeCartridge>(printer.Cartridge);
        }
    }
}